package com.movitech.mobile.cz.base.bizconfig.mapper.ext;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.movitech.mobile.cz.base.bizconfig.entity.SSuppliersCategory;
import com.movitech.mobile.cz.base.bizconfig.entity.ext.ExtSSuppliersCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 供应商分类 Mapper 接口
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-02-28
 */
@Component
@Mapper
public interface ExtSSuppliersCategoryMapper extends BaseMapper<ExtSSuppliersCategory> {

    List<ExtSSuppliersCategory> selectByCode(@Param("code") String code);

	String getSupplierCategoryNames(String[] supplierCategoryIdArr);

    List<ExtSSuppliersCategory> getSupplierCategoryByFlag(ExtSSuppliersCategory extSSuppliersCategory);

	List<SSuppliersCategory> selectSupplierCateListByLevel(@Param("level") String level);

    Integer findSuppliersCategoryTreeListCount(Map<String, Object> map);

    List<ExtSSuppliersCategory> findSuppliersCategoryTreeList(Map<String, Object> map);

    SSuppliersCategory getByParentId(@Param("parentId") String parentId);

	List<ExtSSuppliersCategory> selectByCategoryNameAndParentId(@Param("parentId") String parentId,@Param("categoryName") String categoryName);

    List<ExtSSuppliersCategory> selectAll();
}
